<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>lesson5_弹出层</title>
		<link rel="stylesheet" href="./layui/css/layui.css">
	</head>
	<body>
		<button id="btn">删除</button>
		
		<!-- 引入js-->
		<script src="./layui/layui.js"></script>
		<!-- 引入表单模块 -->
		<script>
			layui.use(['layer','form'],function(){
				var layer = layui.layer;
				var form = layui.form;
				//layer.msg("hello")
				var b = document.getElementById("btn");
				b.onclick = function(){
					//alert("=====");
					layer.confirm("是否删除",function(index){
						console.log("删除")
						layer.close(index)
					})
				}
			});
		</script>
	</body>
</html>